/*
* Copyright 2024 NXP
* NXP Confidential and Proprietary. This software is owned or controlled by NXP and may only be used strictly in
* accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
* activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
* comply with and are bound by, such license terms.  If you do not agree to be bound by the applicable license
* terms, then you may not retain, install, activate or otherwise use the software.
*/

#include "lvgl.h"
#include <stdio.h>
#include "gui_guider.h"
#include "events_init.h"
#include "widgets_init.h"
#include "custom.h"


void setup_scr_screen_content(lv_ui *ui)
{
	//Write codes screen_content
	ui->screen_content = lv_obj_create(NULL);
	lv_obj_set_size(ui->screen_content, 480, 320);
	lv_obj_set_scrollbar_mode(ui->screen_content, LV_SCROLLBAR_MODE_OFF);

	//Write style for screen_content, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_bg_opa(ui->screen_content, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes screen_content_img_main
	ui->screen_content_img_main = lv_img_create(ui->screen_content);
	lv_obj_add_flag(ui->screen_content_img_main, LV_OBJ_FLAG_CLICKABLE);
	lv_img_set_src(ui->screen_content_img_main, &_6_2_480x320);
	lv_img_set_pivot(ui->screen_content_img_main, 50,50);
	lv_img_set_angle(ui->screen_content_img_main, 0);
	lv_obj_set_pos(ui->screen_content_img_main, 0, 0);
	lv_obj_set_size(ui->screen_content_img_main, 480, 320);
	lv_obj_set_scrollbar_mode(ui->screen_content_img_main, LV_SCROLLBAR_MODE_OFF);

	//Write style for screen_content_img_main, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_img_opa(ui->screen_content_img_main, 255, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes screen_content_btn_background
	ui->screen_content_btn_background = lv_btn_create(ui->screen_content);
	ui->screen_content_btn_background_label = lv_label_create(ui->screen_content_btn_background);
	lv_label_set_text(ui->screen_content_btn_background_label, "");
	lv_label_set_long_mode(ui->screen_content_btn_background_label, LV_LABEL_LONG_WRAP);
	lv_obj_align(ui->screen_content_btn_background_label, LV_ALIGN_CENTER, 0, 0);
	lv_obj_set_style_pad_all(ui->screen_content_btn_background, 0, LV_STATE_DEFAULT);
	lv_obj_set_pos(ui->screen_content_btn_background, 280, 173);
	lv_obj_set_size(ui->screen_content_btn_background, 96, 96);
	lv_obj_set_scrollbar_mode(ui->screen_content_btn_background, LV_SCROLLBAR_MODE_OFF);

	//Write style for screen_content_btn_background, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_bg_opa(ui->screen_content_btn_background, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_border_width(ui->screen_content_btn_background, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_radius(ui->screen_content_btn_background, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_width(ui->screen_content_btn_background, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_color(ui->screen_content_btn_background, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->screen_content_btn_background, &lv_font_simsun_20, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_align(ui->screen_content_btn_background, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes screen_content_btn_pinyin
	ui->screen_content_btn_pinyin = lv_btn_create(ui->screen_content);
	ui->screen_content_btn_pinyin_label = lv_label_create(ui->screen_content_btn_pinyin);
	lv_label_set_text(ui->screen_content_btn_pinyin_label, "");
	lv_label_set_long_mode(ui->screen_content_btn_pinyin_label, LV_LABEL_LONG_WRAP);
	lv_obj_align(ui->screen_content_btn_pinyin_label, LV_ALIGN_CENTER, 0, 0);
	lv_obj_set_style_pad_all(ui->screen_content_btn_pinyin, 0, LV_STATE_DEFAULT);
	lv_obj_set_pos(ui->screen_content_btn_pinyin, 104, 173);
	lv_obj_set_size(ui->screen_content_btn_pinyin, 96, 96);
	lv_obj_set_scrollbar_mode(ui->screen_content_btn_pinyin, LV_SCROLLBAR_MODE_OFF);

	//Write style for screen_content_btn_pinyin, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_bg_opa(ui->screen_content_btn_pinyin, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_border_width(ui->screen_content_btn_pinyin, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_radius(ui->screen_content_btn_pinyin, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_width(ui->screen_content_btn_pinyin, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_color(ui->screen_content_btn_pinyin, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->screen_content_btn_pinyin, &lv_font_simsun_20, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_align(ui->screen_content_btn_pinyin, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes screen_content_btn_widget
	ui->screen_content_btn_widget = lv_btn_create(ui->screen_content);
	ui->screen_content_btn_widget_label = lv_label_create(ui->screen_content_btn_widget);
	lv_label_set_text(ui->screen_content_btn_widget_label, "");
	lv_label_set_long_mode(ui->screen_content_btn_widget_label, LV_LABEL_LONG_WRAP);
	lv_obj_align(ui->screen_content_btn_widget_label, LV_ALIGN_CENTER, 0, 0);
	lv_obj_set_style_pad_all(ui->screen_content_btn_widget, 0, LV_STATE_DEFAULT);
	lv_obj_set_pos(ui->screen_content_btn_widget, 280, 28);
	lv_obj_set_size(ui->screen_content_btn_widget, 96, 96);
	lv_obj_set_scrollbar_mode(ui->screen_content_btn_widget, LV_SCROLLBAR_MODE_OFF);

	//Write style for screen_content_btn_widget, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_bg_opa(ui->screen_content_btn_widget, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_border_width(ui->screen_content_btn_widget, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_radius(ui->screen_content_btn_widget, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_width(ui->screen_content_btn_widget, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_color(ui->screen_content_btn_widget, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->screen_content_btn_widget, &lv_font_simsun_20, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_align(ui->screen_content_btn_widget, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes screen_content_btn_panel
	ui->screen_content_btn_panel = lv_btn_create(ui->screen_content);
	ui->screen_content_btn_panel_label = lv_label_create(ui->screen_content_btn_panel);
	lv_label_set_text(ui->screen_content_btn_panel_label, "");
	lv_label_set_long_mode(ui->screen_content_btn_panel_label, LV_LABEL_LONG_WRAP);
	lv_obj_align(ui->screen_content_btn_panel_label, LV_ALIGN_CENTER, 0, 0);
	lv_obj_set_style_pad_all(ui->screen_content_btn_panel, 0, LV_STATE_DEFAULT);
	lv_obj_set_pos(ui->screen_content_btn_panel, 104, 28);
	lv_obj_set_size(ui->screen_content_btn_panel, 96, 96);
	lv_obj_set_scrollbar_mode(ui->screen_content_btn_panel, LV_SCROLLBAR_MODE_OFF);

	//Write style for screen_content_btn_panel, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_bg_opa(ui->screen_content_btn_panel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_border_width(ui->screen_content_btn_panel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_radius(ui->screen_content_btn_panel, 5, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_width(ui->screen_content_btn_panel, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_color(ui->screen_content_btn_panel, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->screen_content_btn_panel, &lv_font_simsun_20, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_align(ui->screen_content_btn_panel, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Update current screen layout.
	lv_obj_update_layout(ui->screen_content);

	
	//Init events for screen.
	events_init_screen_content(ui);
}
